<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="stockId" placeholder="编号">
        <input type="text" class="form-control search-item" ng-model="stockName" placeholder="名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="grid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="grid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'pickMaterial/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'stockId'">编号</th>
                <th data-options="field: 'stockName'">名称</th>
                <th data-options="field: 'materialSpec'">规格</th>
                <th data-options="field: 'materialUnit'">单位</th>
                <th data-options="field: 'applyCount'">请领数量</th>
                <th data-options="field: 'actualCount'">实发数量</th>
                <th data-options="field: 'price'">单价</th>
                <th data-options="field: 'totalPrice'">总价</th>
                <th data-options="field: 'deptName'">领料部门</th>
                <th data-options="field: 'pickEmpId'">领料人</th>
                <th data-options="field: 'status | code : pick_material_status'" style="width: 120px;">状态</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="editModal" data-options="title: '领料单编辑', static: true, width: 720">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
            <div class="form-group">
                <label class="col-md-2 control-label">材料</label>
                <div class="col-md-4">
                    <div ed-combotree name="material"
                         data-options="idField: 'id', textField: 'name', parentIdField: 'parentId'"
                         ng-model="pickMaterial.id" ed-selectable="selectable(data)" ed-data="stockList" required></div>
                </div>
                <label class="col-md-2 control-label">领料部门</label>
                <div class="col-md-4">
                    <div ed-combotree data-options="idField: 'deptId', textField: 'deptName', parentIdField: 'parentDeptId'"
                         ng-model="pickMaterial.deptId" ed-data="depts" placeholder="领料部门" name="pickDeptId" required></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">规格</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="materialSpec" ng-model="pickMaterial.materialSpec">
                </div>
                <label class="col-md-2 control-label">单位</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="materialUnit" ng-model="pickMaterial.materialUnit">
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">请领数量</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" ed-validate="integer" name="applyCount" ng-model="pickMaterial.applyCount" required>
                </div>
                <label class="col-md-2 control-label">单价(￥)</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="price" ng-model="pickMaterial.price" required>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="editModalObj.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="editModalObj.ok();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>